package reflection;

import java.io.IOException;
import java.io.Serializable;

/**
 * @author 吴阳基
 * @datetime 2024/1/3 11:41
 */
public final class Person extends BaseClass implements Serializable {
    private String name;
    static final int age = 20;
    protected String address;
    public String message;

    public Person() {
    }

    public Person(String name) {
        this.name = name;

    }

    public Person(String name, String address, String message) {
        this.name = name;
        this.address = address;
        this.message = message;
    }

    static final int getAge() {
        return age;
    }

    protected String getAddress() {
        return address;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public void setAddress(String address) {
        this.address = address;
    }

    private void silentMethod() throws IOException, NullPointerException {

        System.out.println("I am a private method");
    }

    public String toString() {
        return "Person{name = " + name + ", age = " + age + ", address = " + address + ", message = " + message + "}";
    }
}
